{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 随机数生成六个班的考试成绩，3门考试：Python、数学、语文 每个班50人"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 55,  14,  10],\n",
       "       [ 81,  71,  21],\n",
       "       [ 41,  35,  15],\n",
       "       [  3,  36,  38],\n",
       "       [ 33,  94,  39],\n",
       "       [ 19,  28,  26],\n",
       "       [ 65,   1,  40],\n",
       "       [ 86,  11,  99],\n",
       "       [ 42,  96,   2],\n",
       "       [ 74,   6,   4],\n",
       "       [ 90,  48,   6],\n",
       "       [ 35,   1,  14],\n",
       "       [ 28,  51,  26],\n",
       "       [ 25,  79,  22],\n",
       "       [100,   2,  21],\n",
       "       [ 82,  56,   8],\n",
       "       [ 92,  34,  47],\n",
       "       [ 53,  84,   6],\n",
       "       [ 24,  26,  91],\n",
       "       [ 11,  62,  11],\n",
       "       [ 64,  79,  66],\n",
       "       [ 49,  56,  11],\n",
       "       [ 20,  95,  72],\n",
       "       [  7,  65,  80],\n",
       "       [ 63,  28,  64],\n",
       "       [ 99,  74,  29],\n",
       "       [ 28,  96,  98],\n",
       "       [ 25,  97,   4],\n",
       "       [ 39,  35,  84],\n",
       "       [ 73,  97,   3],\n",
       "       [ 42,  35,  27],\n",
       "       [ 73,  34,  71],\n",
       "       [ 67,   4,  31],\n",
       "       [  5,  76,  11],\n",
       "       [ 81,   4,  56],\n",
       "       [ 21,  62,   1],\n",
       "       [ 47,  56,  89],\n",
       "       [ 56,  53,  62],\n",
       "       [ 54,  37,  41],\n",
       "       [ 56,  45,  76],\n",
       "       [ 12,  47,  78],\n",
       "       [ 54,  53,  47],\n",
       "       [ 75,  30,   1],\n",
       "       [ 15,  76,  57],\n",
       "       [ 68,  46,  58],\n",
       "       [ 68,  99,  25],\n",
       "       [ 55,  73,  58],\n",
       "       [ 55,  18,  55],\n",
       "       [ 52,  68,  87],\n",
       "       [ 20,  77,  26]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 94,  88,  66],\n",
       "       [ 21,  40,  64],\n",
       "       [ 34,  60,  27],\n",
       "       [ 76,  63,   3],\n",
       "       [ 72,  38,  56],\n",
       "       [ 99,  91,  79],\n",
       "       [ 80,  19,  59],\n",
       "       [ 24, 100,  67],\n",
       "       [ 59,  90,  81],\n",
       "       [ 56,  92,  49],\n",
       "       [ 41,  23,  79],\n",
       "       [ 39,  82,  57],\n",
       "       [ 61,  48,  29],\n",
       "       [ 84,  74,  38],\n",
       "       [ 67,  86,  99],\n",
       "       [ 87,  94,  76],\n",
       "       [ 57,  14,  89],\n",
       "       [ 74,  54,  65],\n",
       "       [ 48,  81,  63],\n",
       "       [ 66,  47,  84],\n",
       "       [ 57,  85,  82],\n",
       "       [ 10,  97,  70],\n",
       "       [ 25,   6,   1],\n",
       "       [ 72,  21,  78],\n",
       "       [ 23,  29,  49],\n",
       "       [  5,  47,  64],\n",
       "       [ 55,  71,  99],\n",
       "       [ 84,  80,  28],\n",
       "       [ 87,  76,  78],\n",
       "       [ 89,  44,  47],\n",
       "       [ 13,  67,   3],\n",
       "       [ 61,   4,  74],\n",
       "       [ 59, 100,  28],\n",
       "       [ 88,  60,  86],\n",
       "       [ 18,  75,  98],\n",
       "       [ 14,  11,  26],\n",
       "       [ 20,  82,  79],\n",
       "       [ 16,  26,  46],\n",
       "       [ 16,  81,  13],\n",
       "       [ 65,  32,  53],\n",
       "       [ 74,  89,  34],\n",
       "       [ 11,  54,  70],\n",
       "       [ 88,  18,  89],\n",
       "       [ 90,  82,  19],\n",
       "       [ 90,  14,   6],\n",
       "       [ 99,  56,  42],\n",
       "       [  4,  29,  50],\n",
       "       [ 42,  10,  59],\n",
       "       [ 74,  71,  46],\n",
       "       [ 14,  97,  15]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 42,  21,  65],\n",
       "       [ 49,   3,  55],\n",
       "       [ 61,  99,  80],\n",
       "       [ 55,  61,  42],\n",
       "       [ 16,   9,  95],\n",
       "       [ 27,  53,  98],\n",
       "       [ 34,  88,  42],\n",
       "       [ 50,  67,  97],\n",
       "       [ 19,  20,  98],\n",
       "       [ 37,  55,   6],\n",
       "       [ 85,  64,  91],\n",
       "       [ 20,  52,  85],\n",
       "       [ 58,   0,  44],\n",
       "       [ 70,  66,  75],\n",
       "       [ 28,  21,   0],\n",
       "       [ 95,  25,  54],\n",
       "       [ 31,  39,  55],\n",
       "       [ 79,  50,   3],\n",
       "       [ 15,  94,  45],\n",
       "       [ 20,  65,  52],\n",
       "       [ 44,  12,  54],\n",
       "       [ 90,  23,  36],\n",
       "       [ 90,  25,  41],\n",
       "       [ 11,  91,   4],\n",
       "       [ 95,   8,  76],\n",
       "       [ 68,  25,  91],\n",
       "       [ 43,  34,  53],\n",
       "       [  4,  56,  65],\n",
       "       [ 66,  11,  12],\n",
       "       [ 93,  13,   5],\n",
       "       [ 16,  83,  95],\n",
       "       [ 38,  64,  96],\n",
       "       [ 58,  53,  11],\n",
       "       [ 10,  51,  22],\n",
       "       [ 94, 100,  90],\n",
       "       [  1,  71,  64],\n",
       "       [ 17,  57,  76],\n",
       "       [ 69,  43,  36],\n",
       "       [ 66,  16,  44],\n",
       "       [ 27,  93,  98],\n",
       "       [ 36,  33,  99],\n",
       "       [ 46,  32,  41],\n",
       "       [ 94,  23,  18],\n",
       "       [ 49,  23,  30],\n",
       "       [ 46,  82,  88],\n",
       "       [ 91,   2,  51],\n",
       "       [ 35,  56,  94],\n",
       "       [ 15,  25,  75],\n",
       "       [ 13,  92,  27],\n",
       "       [ 34,  79,  12]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 50,  25,  39],\n",
       "       [ 80,  79,  74],\n",
       "       [ 82,  78,  43],\n",
       "       [ 86,  95,  19],\n",
       "       [ 28,  94,  42],\n",
       "       [ 87,  52,  99],\n",
       "       [ 40,  15,  47],\n",
       "       [ 92,  84,  72],\n",
       "       [ 39,  56,  85],\n",
       "       [ 90,  49,  73],\n",
       "       [ 58,  10,   5],\n",
       "       [ 69,  52,  20],\n",
       "       [ 99,  38,  63],\n",
       "       [ 55,  30,  34],\n",
       "       [ 80,  59,  27],\n",
       "       [ 14,  79,  59],\n",
       "       [ 12,  21,  90],\n",
       "       [ 23,  95,   0],\n",
       "       [ 49,  13,  96],\n",
       "       [ 23,  57,  55],\n",
       "       [ 87,   7,   1],\n",
       "       [ 38,  12,  85],\n",
       "       [ 26,  17,  22],\n",
       "       [ 47,  45,  81],\n",
       "       [ 68,  36,  71],\n",
       "       [ 96,  94,  44],\n",
       "       [ 10,  26,  10],\n",
       "       [ 16,  23,  74],\n",
       "       [ 32,  19,  85],\n",
       "       [  0,  39,  46],\n",
       "       [ 38,  74,  14],\n",
       "       [ 65,  87,  39],\n",
       "       [ 44,   3,  22],\n",
       "       [100,  46,  38],\n",
       "       [ 90,  42,  50],\n",
       "       [  6,  31,   9],\n",
       "       [ 44,  31,  72],\n",
       "       [ 23,  97,  95],\n",
       "       [ 20,   1,  91],\n",
       "       [ 60,  72,  74],\n",
       "       [ 27,   1,   8],\n",
       "       [  5,  15,  76],\n",
       "       [ 16,  99,  39],\n",
       "       [ 76,  76,  67],\n",
       "       [  4,  68,  46],\n",
       "       [ 53,  73,  68],\n",
       "       [ 35,  33,  73],\n",
       "       [ 26,  47,  15],\n",
       "       [ 77,  64,  53],\n",
       "       [ 64,  59,  82]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 12,  16,  68],\n",
       "       [ 60,  70,  97],\n",
       "       [ 30,   9,  33],\n",
       "       [ 50,  30,  96],\n",
       "       [ 51,  35,  65],\n",
       "       [ 76,  81,  27],\n",
       "       [ 62,  33,  91],\n",
       "       [ 73,  60,  35],\n",
       "       [ 78,  82,  36],\n",
       "       [ 85,  61,  75],\n",
       "       [ 80,  90,  48],\n",
       "       [ 99,  50,  21],\n",
       "       [ 10,  23,  16],\n",
       "       [  2,  66,   7],\n",
       "       [ 40,  82,  16],\n",
       "       [  2,  16,  15],\n",
       "       [100,  92,  46],\n",
       "       [ 68,  48,  12],\n",
       "       [ 90,  68,  42],\n",
       "       [ 90,  53, 100],\n",
       "       [ 81,  33,  99],\n",
       "       [ 96,  19,  84],\n",
       "       [ 87,  89,   6],\n",
       "       [ 95,  49,  46],\n",
       "       [100,  57,  65],\n",
       "       [ 33,  94,  93],\n",
       "       [ 84,  82,  75],\n",
       "       [ 76,  88,  68],\n",
       "       [ 23,  68,  62],\n",
       "       [ 79,  88,  79],\n",
       "       [100,   1,  88],\n",
       "       [ 53,  99,  23],\n",
       "       [  1,  52,  16],\n",
       "       [ 43,  58,  35],\n",
       "       [  4,  88,  75],\n",
       "       [ 55,  12,   5],\n",
       "       [ 17,  16,  31],\n",
       "       [ 69,  38,   9],\n",
       "       [ 66,  64,  67],\n",
       "       [ 58,  14,   9],\n",
       "       [ 66,  70,   8],\n",
       "       [ 65,  41,  39],\n",
       "       [ 14,  42,  75],\n",
       "       [ 68,  60,  18],\n",
       "       [ 93,  88,  51],\n",
       "       [ 73,  57,  38],\n",
       "       [ 81,  29,  65],\n",
       "       [ 63,  72,  48],\n",
       "       [ 39,  82,  25],\n",
       "       [ 24,  66,  53]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 92,  43,  68],\n",
       "       [ 14,  56,  20],\n",
       "       [ 95,  38,  67],\n",
       "       [ 26,  21,  40],\n",
       "       [  7,  51, 100],\n",
       "       [ 59,  24,   3],\n",
       "       [ 52,  86,  26],\n",
       "       [ 28,   3,   5],\n",
       "       [  7,  85,  50],\n",
       "       [ 71,   1,  71],\n",
       "       [ 85,  64,  16],\n",
       "       [ 20,  35,  69],\n",
       "       [ 51,  26,  97],\n",
       "       [ 98,  56,  24],\n",
       "       [ 84,  90,  56],\n",
       "       [ 89,  20,  15],\n",
       "       [ 70,  42,  24],\n",
       "       [ 15,  57,  25],\n",
       "       [ 86,  39,  14],\n",
       "       [ 98,  84,  68],\n",
       "       [ 85,  76,  88],\n",
       "       [ 16,  14,  80],\n",
       "       [ 38,  46,  56],\n",
       "       [ 67,  12,   4],\n",
       "       [ 78,  27,   8],\n",
       "       [ 38,  11,  31],\n",
       "       [  6,   4,  79],\n",
       "       [  4,  86,  76],\n",
       "       [ 89,  51,  50],\n",
       "       [ 62,  22,  86],\n",
       "       [ 66,  45,  57],\n",
       "       [ 72,   4,  58],\n",
       "       [ 26,  29,   0],\n",
       "       [ 31,  42,  96],\n",
       "       [  8,  79,   1],\n",
       "       [ 91,  55,  42],\n",
       "       [ 45,  54,  30],\n",
       "       [ 70,  31,  94],\n",
       "       [ 89,  47,   5],\n",
       "       [ 65,   5,  16],\n",
       "       [  0,  91,  29],\n",
       "       [ 62,  69,  78],\n",
       "       [ 95,  65,   7],\n",
       "       [ 81,  96,  35],\n",
       "       [ 42,  89,  12],\n",
       "       [ 40,  66,  47],\n",
       "       [ 27,  95,  22],\n",
       "       [ 82,  47,  76],\n",
       "       [ 21,  99,  21],\n",
       "       [ 75,  12,  51]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "score1 = np.random.randint(0,101,size = (50,3))\n",
    "score2 = np.random.randint(0,101,size = (50,3))\n",
    "score3 = np.random.randint(0,101,size = (50,3))\n",
    "score4 = np.random.randint(0,101,size = (50,3))\n",
    "score5 = np.random.randint(0,101,size = (50,3))\n",
    "score6 = np.random.randint(0,101,size = (50,3))\n",
    "display(score1,score2,score3,score4,score5,score6)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 将六个班的考试成绩进行合并得到score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 55,  14,  10],\n",
       "       [ 81,  71,  21],\n",
       "       [ 41,  35,  15],\n",
       "       [  3,  36,  38],\n",
       "       [ 33,  94,  39],\n",
       "       [ 19,  28,  26],\n",
       "       [ 65,   1,  40],\n",
       "       [ 86,  11,  99],\n",
       "       [ 42,  96,   2],\n",
       "       [ 74,   6,   4],\n",
       "       [ 90,  48,   6],\n",
       "       [ 35,   1,  14],\n",
       "       [ 28,  51,  26],\n",
       "       [ 25,  79,  22],\n",
       "       [100,   2,  21],\n",
       "       [ 82,  56,   8],\n",
       "       [ 92,  34,  47],\n",
       "       [ 53,  84,   6],\n",
       "       [ 24,  26,  91],\n",
       "       [ 11,  62,  11],\n",
       "       [ 64,  79,  66],\n",
       "       [ 49,  56,  11],\n",
       "       [ 20,  95,  72],\n",
       "       [  7,  65,  80],\n",
       "       [ 63,  28,  64],\n",
       "       [ 99,  74,  29],\n",
       "       [ 28,  96,  98],\n",
       "       [ 25,  97,   4],\n",
       "       [ 39,  35,  84],\n",
       "       [ 73,  97,   3],\n",
       "       [ 42,  35,  27],\n",
       "       [ 73,  34,  71],\n",
       "       [ 67,   4,  31],\n",
       "       [  5,  76,  11],\n",
       "       [ 81,   4,  56],\n",
       "       [ 21,  62,   1],\n",
       "       [ 47,  56,  89],\n",
       "       [ 56,  53,  62],\n",
       "       [ 54,  37,  41],\n",
       "       [ 56,  45,  76],\n",
       "       [ 12,  47,  78],\n",
       "       [ 54,  53,  47],\n",
       "       [ 75,  30,   1],\n",
       "       [ 15,  76,  57],\n",
       "       [ 68,  46,  58],\n",
       "       [ 68,  99,  25],\n",
       "       [ 55,  73,  58],\n",
       "       [ 55,  18,  55],\n",
       "       [ 52,  68,  87],\n",
       "       [ 20,  77,  26],\n",
       "       [ 94,  88,  66],\n",
       "       [ 21,  40,  64],\n",
       "       [ 34,  60,  27],\n",
       "       [ 76,  63,   3],\n",
       "       [ 72,  38,  56],\n",
       "       [ 99,  91,  79],\n",
       "       [ 80,  19,  59],\n",
       "       [ 24, 100,  67],\n",
       "       [ 59,  90,  81],\n",
       "       [ 56,  92,  49],\n",
       "       [ 41,  23,  79],\n",
       "       [ 39,  82,  57],\n",
       "       [ 61,  48,  29],\n",
       "       [ 84,  74,  38],\n",
       "       [ 67,  86,  99],\n",
       "       [ 87,  94,  76],\n",
       "       [ 57,  14,  89],\n",
       "       [ 74,  54,  65],\n",
       "       [ 48,  81,  63],\n",
       "       [ 66,  47,  84],\n",
       "       [ 57,  85,  82],\n",
       "       [ 10,  97,  70],\n",
       "       [ 25,   6,   1],\n",
       "       [ 72,  21,  78],\n",
       "       [ 23,  29,  49],\n",
       "       [  5,  47,  64],\n",
       "       [ 55,  71,  99],\n",
       "       [ 84,  80,  28],\n",
       "       [ 87,  76,  78],\n",
       "       [ 89,  44,  47],\n",
       "       [ 13,  67,   3],\n",
       "       [ 61,   4,  74],\n",
       "       [ 59, 100,  28],\n",
       "       [ 88,  60,  86],\n",
       "       [ 18,  75,  98],\n",
       "       [ 14,  11,  26],\n",
       "       [ 20,  82,  79],\n",
       "       [ 16,  26,  46],\n",
       "       [ 16,  81,  13],\n",
       "       [ 65,  32,  53],\n",
       "       [ 74,  89,  34],\n",
       "       [ 11,  54,  70],\n",
       "       [ 88,  18,  89],\n",
       "       [ 90,  82,  19],\n",
       "       [ 90,  14,   6],\n",
       "       [ 99,  56,  42],\n",
       "       [  4,  29,  50],\n",
       "       [ 42,  10,  59],\n",
       "       [ 74,  71,  46],\n",
       "       [ 14,  97,  15],\n",
       "       [ 42,  21,  65],\n",
       "       [ 49,   3,  55],\n",
       "       [ 61,  99,  80],\n",
       "       [ 55,  61,  42],\n",
       "       [ 16,   9,  95],\n",
       "       [ 27,  53,  98],\n",
       "       [ 34,  88,  42],\n",
       "       [ 50,  67,  97],\n",
       "       [ 19,  20,  98],\n",
       "       [ 37,  55,   6],\n",
       "       [ 85,  64,  91],\n",
       "       [ 20,  52,  85],\n",
       "       [ 58,   0,  44],\n",
       "       [ 70,  66,  75],\n",
       "       [ 28,  21,   0],\n",
       "       [ 95,  25,  54],\n",
       "       [ 31,  39,  55],\n",
       "       [ 79,  50,   3],\n",
       "       [ 15,  94,  45],\n",
       "       [ 20,  65,  52],\n",
       "       [ 44,  12,  54],\n",
       "       [ 90,  23,  36],\n",
       "       [ 90,  25,  41],\n",
       "       [ 11,  91,   4],\n",
       "       [ 95,   8,  76],\n",
       "       [ 68,  25,  91],\n",
       "       [ 43,  34,  53],\n",
       "       [  4,  56,  65],\n",
       "       [ 66,  11,  12],\n",
       "       [ 93,  13,   5],\n",
       "       [ 16,  83,  95],\n",
       "       [ 38,  64,  96],\n",
       "       [ 58,  53,  11],\n",
       "       [ 10,  51,  22],\n",
       "       [ 94, 100,  90],\n",
       "       [  1,  71,  64],\n",
       "       [ 17,  57,  76],\n",
       "       [ 69,  43,  36],\n",
       "       [ 66,  16,  44],\n",
       "       [ 27,  93,  98],\n",
       "       [ 36,  33,  99],\n",
       "       [ 46,  32,  41],\n",
       "       [ 94,  23,  18],\n",
       "       [ 49,  23,  30],\n",
       "       [ 46,  82,  88],\n",
       "       [ 91,   2,  51],\n",
       "       [ 35,  56,  94],\n",
       "       [ 15,  25,  75],\n",
       "       [ 13,  92,  27],\n",
       "       [ 34,  79,  12],\n",
       "       [ 50,  25,  39],\n",
       "       [ 80,  79,  74],\n",
       "       [ 82,  78,  43],\n",
       "       [ 86,  95,  19],\n",
       "       [ 28,  94,  42],\n",
       "       [ 87,  52,  99],\n",
       "       [ 40,  15,  47],\n",
       "       [ 92,  84,  72],\n",
       "       [ 39,  56,  85],\n",
       "       [ 90,  49,  73],\n",
       "       [ 58,  10,   5],\n",
       "       [ 69,  52,  20],\n",
       "       [ 99,  38,  63],\n",
       "       [ 55,  30,  34],\n",
       "       [ 80,  59,  27],\n",
       "       [ 14,  79,  59],\n",
       "       [ 12,  21,  90],\n",
       "       [ 23,  95,   0],\n",
       "       [ 49,  13,  96],\n",
       "       [ 23,  57,  55],\n",
       "       [ 87,   7,   1],\n",
       "       [ 38,  12,  85],\n",
       "       [ 26,  17,  22],\n",
       "       [ 47,  45,  81],\n",
       "       [ 68,  36,  71],\n",
       "       [ 96,  94,  44],\n",
       "       [ 10,  26,  10],\n",
       "       [ 16,  23,  74],\n",
       "       [ 32,  19,  85],\n",
       "       [  0,  39,  46],\n",
       "       [ 38,  74,  14],\n",
       "       [ 65,  87,  39],\n",
       "       [ 44,   3,  22],\n",
       "       [100,  46,  38],\n",
       "       [ 90,  42,  50],\n",
       "       [  6,  31,   9],\n",
       "       [ 44,  31,  72],\n",
       "       [ 23,  97,  95],\n",
       "       [ 20,   1,  91],\n",
       "       [ 60,  72,  74],\n",
       "       [ 27,   1,   8],\n",
       "       [  5,  15,  76],\n",
       "       [ 16,  99,  39],\n",
       "       [ 76,  76,  67],\n",
       "       [  4,  68,  46],\n",
       "       [ 53,  73,  68],\n",
       "       [ 35,  33,  73],\n",
       "       [ 26,  47,  15],\n",
       "       [ 77,  64,  53],\n",
       "       [ 64,  59,  82],\n",
       "       [ 12,  16,  68],\n",
       "       [ 60,  70,  97],\n",
       "       [ 30,   9,  33],\n",
       "       [ 50,  30,  96],\n",
       "       [ 51,  35,  65],\n",
       "       [ 76,  81,  27],\n",
       "       [ 62,  33,  91],\n",
       "       [ 73,  60,  35],\n",
       "       [ 78,  82,  36],\n",
       "       [ 85,  61,  75],\n",
       "       [ 80,  90,  48],\n",
       "       [ 99,  50,  21],\n",
       "       [ 10,  23,  16],\n",
       "       [  2,  66,   7],\n",
       "       [ 40,  82,  16],\n",
       "       [  2,  16,  15],\n",
       "       [100,  92,  46],\n",
       "       [ 68,  48,  12],\n",
       "       [ 90,  68,  42],\n",
       "       [ 90,  53, 100],\n",
       "       [ 81,  33,  99],\n",
       "       [ 96,  19,  84],\n",
       "       [ 87,  89,   6],\n",
       "       [ 95,  49,  46],\n",
       "       [100,  57,  65],\n",
       "       [ 33,  94,  93],\n",
       "       [ 84,  82,  75],\n",
       "       [ 76,  88,  68],\n",
       "       [ 23,  68,  62],\n",
       "       [ 79,  88,  79],\n",
       "       [100,   1,  88],\n",
       "       [ 53,  99,  23],\n",
       "       [  1,  52,  16],\n",
       "       [ 43,  58,  35],\n",
       "       [  4,  88,  75],\n",
       "       [ 55,  12,   5],\n",
       "       [ 17,  16,  31],\n",
       "       [ 69,  38,   9],\n",
       "       [ 66,  64,  67],\n",
       "       [ 58,  14,   9],\n",
       "       [ 66,  70,   8],\n",
       "       [ 65,  41,  39],\n",
       "       [ 14,  42,  75],\n",
       "       [ 68,  60,  18],\n",
       "       [ 93,  88,  51],\n",
       "       [ 73,  57,  38],\n",
       "       [ 81,  29,  65],\n",
       "       [ 63,  72,  48],\n",
       "       [ 39,  82,  25],\n",
       "       [ 24,  66,  53],\n",
       "       [ 92,  43,  68],\n",
       "       [ 14,  56,  20],\n",
       "       [ 95,  38,  67],\n",
       "       [ 26,  21,  40],\n",
       "       [  7,  51, 100],\n",
       "       [ 59,  24,   3],\n",
       "       [ 52,  86,  26],\n",
       "       [ 28,   3,   5],\n",
       "       [  7,  85,  50],\n",
       "       [ 71,   1,  71],\n",
       "       [ 85,  64,  16],\n",
       "       [ 20,  35,  69],\n",
       "       [ 51,  26,  97],\n",
       "       [ 98,  56,  24],\n",
       "       [ 84,  90,  56],\n",
       "       [ 89,  20,  15],\n",
       "       [ 70,  42,  24],\n",
       "       [ 15,  57,  25],\n",
       "       [ 86,  39,  14],\n",
       "       [ 98,  84,  68],\n",
       "       [ 85,  76,  88],\n",
       "       [ 16,  14,  80],\n",
       "       [ 38,  46,  56],\n",
       "       [ 67,  12,   4],\n",
       "       [ 78,  27,   8],\n",
       "       [ 38,  11,  31],\n",
       "       [  6,   4,  79],\n",
       "       [  4,  86,  76],\n",
       "       [ 89,  51,  50],\n",
       "       [ 62,  22,  86],\n",
       "       [ 66,  45,  57],\n",
       "       [ 72,   4,  58],\n",
       "       [ 26,  29,   0],\n",
       "       [ 31,  42,  96],\n",
       "       [  8,  79,   1],\n",
       "       [ 91,  55,  42],\n",
       "       [ 45,  54,  30],\n",
       "       [ 70,  31,  94],\n",
       "       [ 89,  47,   5],\n",
       "       [ 65,   5,  16],\n",
       "       [  0,  91,  29],\n",
       "       [ 62,  69,  78],\n",
       "       [ 95,  65,   7],\n",
       "       [ 81,  96,  35],\n",
       "       [ 42,  89,  12],\n",
       "       [ 40,  66,  47],\n",
       "       [ 27,  95,  22],\n",
       "       [ 82,  47,  76],\n",
       "       [ 21,  99,  21],\n",
       "       [ 75,  12,  51]])"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score = np.concatenate([score1,score2,score3,score4,score5,score6],axis = 0)\n",
    "score"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 生成性别数组sex，水平叠加数组sex和score得到data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[2, 1],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [1, 1],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [1, 1],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [1, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [1, 2],\n",
       "       [1, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 2],\n",
       "       [2, 1],\n",
       "       [2, 1],\n",
       "       [2, 2],\n",
       "       [1, 1]])"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sex1 = np.random.randint(1,3,size = (300,2))  #1表示男生，2表示女生\n",
    "sex1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1, 55, 14, 10],\n",
       "       [ 2, 81, 71, 21],\n",
       "       [ 1, 41, 35, 15],\n",
       "       ...,\n",
       "       [ 1, 82, 47, 76],\n",
       "       [ 2, 21, 99, 21],\n",
       "       [ 1, 75, 12, 51]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "(300, 4)"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1 = np.concatenate([sex1,score],axis=1)\n",
    "data = data1[:,1:]\n",
    "display(data)\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 分别计算男女各科成绩：最小值、最大值、平均分、中位数、标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[ 55,  14,  10]],\n",
       "\n",
       "       [[ 41,  35,  15]],\n",
       "\n",
       "       [[  3,  36,  38]],\n",
       "\n",
       "       [[ 25,  79,  22]],\n",
       "\n",
       "       [[ 82,  56,   8]],\n",
       "\n",
       "       [[ 11,  62,  11]],\n",
       "\n",
       "       [[ 49,  56,  11]],\n",
       "\n",
       "       [[ 20,  95,  72]],\n",
       "\n",
       "       [[ 63,  28,  64]],\n",
       "\n",
       "       [[ 28,  96,  98]],\n",
       "\n",
       "       [[ 39,  35,  84]],\n",
       "\n",
       "       [[ 73,  97,   3]],\n",
       "\n",
       "       [[ 42,  35,  27]],\n",
       "\n",
       "       [[  5,  76,  11]],\n",
       "\n",
       "       [[ 56,  53,  62]],\n",
       "\n",
       "       [[ 54,  37,  41]],\n",
       "\n",
       "       [[ 56,  45,  76]],\n",
       "\n",
       "       [[ 54,  53,  47]],\n",
       "\n",
       "       [[ 15,  76,  57]],\n",
       "\n",
       "       [[ 68,  46,  58]],\n",
       "\n",
       "       [[ 52,  68,  87]],\n",
       "\n",
       "       [[ 94,  88,  66]],\n",
       "\n",
       "       [[ 21,  40,  64]],\n",
       "\n",
       "       [[ 76,  63,   3]],\n",
       "\n",
       "       [[ 80,  19,  59]],\n",
       "\n",
       "       [[ 39,  82,  57]],\n",
       "\n",
       "       [[ 61,  48,  29]],\n",
       "\n",
       "       [[ 84,  74,  38]],\n",
       "\n",
       "       [[ 87,  94,  76]],\n",
       "\n",
       "       [[ 57,  14,  89]],\n",
       "\n",
       "       [[ 74,  54,  65]],\n",
       "\n",
       "       [[ 10,  97,  70]],\n",
       "\n",
       "       [[ 23,  29,  49]],\n",
       "\n",
       "       [[  5,  47,  64]],\n",
       "\n",
       "       [[ 55,  71,  99]],\n",
       "\n",
       "       [[ 84,  80,  28]],\n",
       "\n",
       "       [[ 89,  44,  47]],\n",
       "\n",
       "       [[ 13,  67,   3]],\n",
       "\n",
       "       [[ 18,  75,  98]],\n",
       "\n",
       "       [[ 20,  82,  79]],\n",
       "\n",
       "       [[ 16,  26,  46]],\n",
       "\n",
       "       [[ 65,  32,  53]],\n",
       "\n",
       "       [[ 74,  89,  34]],\n",
       "\n",
       "       [[ 11,  54,  70]],\n",
       "\n",
       "       [[ 88,  18,  89]],\n",
       "\n",
       "       [[ 90,  82,  19]],\n",
       "\n",
       "       [[ 90,  14,   6]],\n",
       "\n",
       "       [[ 74,  71,  46]],\n",
       "\n",
       "       [[ 14,  97,  15]],\n",
       "\n",
       "       [[ 42,  21,  65]],\n",
       "\n",
       "       [[ 61,  99,  80]],\n",
       "\n",
       "       [[ 55,  61,  42]],\n",
       "\n",
       "       [[ 16,   9,  95]],\n",
       "\n",
       "       [[ 34,  88,  42]],\n",
       "\n",
       "       [[ 50,  67,  97]],\n",
       "\n",
       "       [[ 19,  20,  98]],\n",
       "\n",
       "       [[ 85,  64,  91]],\n",
       "\n",
       "       [[ 20,  52,  85]],\n",
       "\n",
       "       [[ 95,  25,  54]],\n",
       "\n",
       "       [[ 79,  50,   3]],\n",
       "\n",
       "       [[ 44,  12,  54]],\n",
       "\n",
       "       [[ 90,  25,  41]],\n",
       "\n",
       "       [[  4,  56,  65]],\n",
       "\n",
       "       [[ 66,  11,  12]],\n",
       "\n",
       "       [[ 16,  83,  95]],\n",
       "\n",
       "       [[ 94, 100,  90]],\n",
       "\n",
       "       [[ 27,  93,  98]],\n",
       "\n",
       "       [[ 46,  32,  41]],\n",
       "\n",
       "       [[ 94,  23,  18]],\n",
       "\n",
       "       [[ 91,   2,  51]],\n",
       "\n",
       "       [[ 15,  25,  75]],\n",
       "\n",
       "       [[ 80,  79,  74]],\n",
       "\n",
       "       [[ 87,  52,  99]],\n",
       "\n",
       "       [[ 40,  15,  47]],\n",
       "\n",
       "       [[ 92,  84,  72]],\n",
       "\n",
       "       [[ 39,  56,  85]],\n",
       "\n",
       "       [[ 90,  49,  73]],\n",
       "\n",
       "       [[ 58,  10,   5]],\n",
       "\n",
       "       [[ 69,  52,  20]],\n",
       "\n",
       "       [[ 99,  38,  63]],\n",
       "\n",
       "       [[ 55,  30,  34]],\n",
       "\n",
       "       [[ 12,  21,  90]],\n",
       "\n",
       "       [[ 38,  12,  85]],\n",
       "\n",
       "       [[ 47,  45,  81]],\n",
       "\n",
       "       [[ 68,  36,  71]],\n",
       "\n",
       "       [[  0,  39,  46]],\n",
       "\n",
       "       [[ 20,   1,  91]],\n",
       "\n",
       "       [[ 27,   1,   8]],\n",
       "\n",
       "       [[ 16,  99,  39]],\n",
       "\n",
       "       [[ 76,  76,  67]],\n",
       "\n",
       "       [[ 26,  47,  15]],\n",
       "\n",
       "       [[ 77,  64,  53]],\n",
       "\n",
       "       [[ 64,  59,  82]],\n",
       "\n",
       "       [[ 12,  16,  68]],\n",
       "\n",
       "       [[ 51,  35,  65]],\n",
       "\n",
       "       [[ 76,  81,  27]],\n",
       "\n",
       "       [[ 62,  33,  91]],\n",
       "\n",
       "       [[ 73,  60,  35]],\n",
       "\n",
       "       [[ 78,  82,  36]],\n",
       "\n",
       "       [[ 85,  61,  75]],\n",
       "\n",
       "       [[  2,  66,   7]],\n",
       "\n",
       "       [[ 68,  48,  12]],\n",
       "\n",
       "       [[ 90,  53, 100]],\n",
       "\n",
       "       [[ 81,  33,  99]],\n",
       "\n",
       "       [[ 95,  49,  46]],\n",
       "\n",
       "       [[100,  57,  65]],\n",
       "\n",
       "       [[ 33,  94,  93]],\n",
       "\n",
       "       [[ 84,  82,  75]],\n",
       "\n",
       "       [[ 76,  88,  68]],\n",
       "\n",
       "       [[ 23,  68,  62]],\n",
       "\n",
       "       [[ 43,  58,  35]],\n",
       "\n",
       "       [[  4,  88,  75]],\n",
       "\n",
       "       [[ 17,  16,  31]],\n",
       "\n",
       "       [[ 58,  14,   9]],\n",
       "\n",
       "       [[ 73,  57,  38]],\n",
       "\n",
       "       [[ 81,  29,  65]],\n",
       "\n",
       "       [[ 39,  82,  25]],\n",
       "\n",
       "       [[ 24,  66,  53]],\n",
       "\n",
       "       [[ 14,  56,  20]],\n",
       "\n",
       "       [[ 52,  86,  26]],\n",
       "\n",
       "       [[ 71,   1,  71]],\n",
       "\n",
       "       [[ 85,  64,  16]],\n",
       "\n",
       "       [[ 20,  35,  69]],\n",
       "\n",
       "       [[ 51,  26,  97]],\n",
       "\n",
       "       [[ 89,  20,  15]],\n",
       "\n",
       "       [[ 70,  42,  24]],\n",
       "\n",
       "       [[ 15,  57,  25]],\n",
       "\n",
       "       [[ 86,  39,  14]],\n",
       "\n",
       "       [[ 98,  84,  68]],\n",
       "\n",
       "       [[ 16,  14,  80]],\n",
       "\n",
       "       [[  6,   4,  79]],\n",
       "\n",
       "       [[  4,  86,  76]],\n",
       "\n",
       "       [[ 89,  51,  50]],\n",
       "\n",
       "       [[ 70,  31,  94]],\n",
       "\n",
       "       [[ 62,  69,  78]],\n",
       "\n",
       "       [[ 95,  65,   7]],\n",
       "\n",
       "       [[ 27,  95,  22]],\n",
       "\n",
       "       [[ 82,  47,  76]],\n",
       "\n",
       "       [[ 75,  12,  51]]])"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bscore = np.argwhere(data[:,0] == 1)\n",
    "b = score[bscore] #男生成绩\n",
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[ 81,  71,  21]],\n",
       "\n",
       "       [[ 33,  94,  39]],\n",
       "\n",
       "       [[ 19,  28,  26]],\n",
       "\n",
       "       [[ 65,   1,  40]],\n",
       "\n",
       "       [[ 86,  11,  99]],\n",
       "\n",
       "       [[ 42,  96,   2]],\n",
       "\n",
       "       [[ 74,   6,   4]],\n",
       "\n",
       "       [[ 90,  48,   6]],\n",
       "\n",
       "       [[ 35,   1,  14]],\n",
       "\n",
       "       [[ 28,  51,  26]],\n",
       "\n",
       "       [[100,   2,  21]],\n",
       "\n",
       "       [[ 92,  34,  47]],\n",
       "\n",
       "       [[ 53,  84,   6]],\n",
       "\n",
       "       [[ 24,  26,  91]],\n",
       "\n",
       "       [[ 64,  79,  66]],\n",
       "\n",
       "       [[  7,  65,  80]],\n",
       "\n",
       "       [[ 99,  74,  29]],\n",
       "\n",
       "       [[ 25,  97,   4]],\n",
       "\n",
       "       [[ 73,  34,  71]],\n",
       "\n",
       "       [[ 67,   4,  31]],\n",
       "\n",
       "       [[ 81,   4,  56]],\n",
       "\n",
       "       [[ 21,  62,   1]],\n",
       "\n",
       "       [[ 47,  56,  89]],\n",
       "\n",
       "       [[ 12,  47,  78]],\n",
       "\n",
       "       [[ 75,  30,   1]],\n",
       "\n",
       "       [[ 68,  99,  25]],\n",
       "\n",
       "       [[ 55,  73,  58]],\n",
       "\n",
       "       [[ 55,  18,  55]],\n",
       "\n",
       "       [[ 20,  77,  26]],\n",
       "\n",
       "       [[ 34,  60,  27]],\n",
       "\n",
       "       [[ 72,  38,  56]],\n",
       "\n",
       "       [[ 99,  91,  79]],\n",
       "\n",
       "       [[ 24, 100,  67]],\n",
       "\n",
       "       [[ 59,  90,  81]],\n",
       "\n",
       "       [[ 56,  92,  49]],\n",
       "\n",
       "       [[ 41,  23,  79]],\n",
       "\n",
       "       [[ 67,  86,  99]],\n",
       "\n",
       "       [[ 48,  81,  63]],\n",
       "\n",
       "       [[ 66,  47,  84]],\n",
       "\n",
       "       [[ 57,  85,  82]],\n",
       "\n",
       "       [[ 25,   6,   1]],\n",
       "\n",
       "       [[ 72,  21,  78]],\n",
       "\n",
       "       [[ 87,  76,  78]],\n",
       "\n",
       "       [[ 61,   4,  74]],\n",
       "\n",
       "       [[ 59, 100,  28]],\n",
       "\n",
       "       [[ 88,  60,  86]],\n",
       "\n",
       "       [[ 14,  11,  26]],\n",
       "\n",
       "       [[ 16,  81,  13]],\n",
       "\n",
       "       [[ 99,  56,  42]],\n",
       "\n",
       "       [[  4,  29,  50]],\n",
       "\n",
       "       [[ 42,  10,  59]],\n",
       "\n",
       "       [[ 49,   3,  55]],\n",
       "\n",
       "       [[ 27,  53,  98]],\n",
       "\n",
       "       [[ 37,  55,   6]],\n",
       "\n",
       "       [[ 58,   0,  44]],\n",
       "\n",
       "       [[ 70,  66,  75]],\n",
       "\n",
       "       [[ 28,  21,   0]],\n",
       "\n",
       "       [[ 31,  39,  55]],\n",
       "\n",
       "       [[ 15,  94,  45]],\n",
       "\n",
       "       [[ 20,  65,  52]],\n",
       "\n",
       "       [[ 90,  23,  36]],\n",
       "\n",
       "       [[ 11,  91,   4]],\n",
       "\n",
       "       [[ 95,   8,  76]],\n",
       "\n",
       "       [[ 68,  25,  91]],\n",
       "\n",
       "       [[ 43,  34,  53]],\n",
       "\n",
       "       [[ 93,  13,   5]],\n",
       "\n",
       "       [[ 38,  64,  96]],\n",
       "\n",
       "       [[ 58,  53,  11]],\n",
       "\n",
       "       [[ 10,  51,  22]],\n",
       "\n",
       "       [[  1,  71,  64]],\n",
       "\n",
       "       [[ 17,  57,  76]],\n",
       "\n",
       "       [[ 69,  43,  36]],\n",
       "\n",
       "       [[ 66,  16,  44]],\n",
       "\n",
       "       [[ 36,  33,  99]],\n",
       "\n",
       "       [[ 49,  23,  30]],\n",
       "\n",
       "       [[ 46,  82,  88]],\n",
       "\n",
       "       [[ 35,  56,  94]],\n",
       "\n",
       "       [[ 13,  92,  27]],\n",
       "\n",
       "       [[ 34,  79,  12]],\n",
       "\n",
       "       [[ 50,  25,  39]],\n",
       "\n",
       "       [[ 82,  78,  43]],\n",
       "\n",
       "       [[ 86,  95,  19]],\n",
       "\n",
       "       [[ 28,  94,  42]],\n",
       "\n",
       "       [[ 80,  59,  27]],\n",
       "\n",
       "       [[ 14,  79,  59]],\n",
       "\n",
       "       [[ 23,  95,   0]],\n",
       "\n",
       "       [[ 49,  13,  96]],\n",
       "\n",
       "       [[ 23,  57,  55]],\n",
       "\n",
       "       [[ 87,   7,   1]],\n",
       "\n",
       "       [[ 26,  17,  22]],\n",
       "\n",
       "       [[ 96,  94,  44]],\n",
       "\n",
       "       [[ 10,  26,  10]],\n",
       "\n",
       "       [[ 16,  23,  74]],\n",
       "\n",
       "       [[ 32,  19,  85]],\n",
       "\n",
       "       [[ 38,  74,  14]],\n",
       "\n",
       "       [[ 65,  87,  39]],\n",
       "\n",
       "       [[ 44,   3,  22]],\n",
       "\n",
       "       [[100,  46,  38]],\n",
       "\n",
       "       [[ 90,  42,  50]],\n",
       "\n",
       "       [[  6,  31,   9]],\n",
       "\n",
       "       [[ 44,  31,  72]],\n",
       "\n",
       "       [[ 23,  97,  95]],\n",
       "\n",
       "       [[ 60,  72,  74]],\n",
       "\n",
       "       [[  5,  15,  76]],\n",
       "\n",
       "       [[  4,  68,  46]],\n",
       "\n",
       "       [[ 53,  73,  68]],\n",
       "\n",
       "       [[ 35,  33,  73]],\n",
       "\n",
       "       [[ 60,  70,  97]],\n",
       "\n",
       "       [[ 30,   9,  33]],\n",
       "\n",
       "       [[ 50,  30,  96]],\n",
       "\n",
       "       [[ 80,  90,  48]],\n",
       "\n",
       "       [[ 99,  50,  21]],\n",
       "\n",
       "       [[ 10,  23,  16]],\n",
       "\n",
       "       [[ 40,  82,  16]],\n",
       "\n",
       "       [[  2,  16,  15]],\n",
       "\n",
       "       [[100,  92,  46]],\n",
       "\n",
       "       [[ 90,  68,  42]],\n",
       "\n",
       "       [[ 96,  19,  84]],\n",
       "\n",
       "       [[ 87,  89,   6]],\n",
       "\n",
       "       [[ 79,  88,  79]],\n",
       "\n",
       "       [[100,   1,  88]],\n",
       "\n",
       "       [[ 53,  99,  23]],\n",
       "\n",
       "       [[  1,  52,  16]],\n",
       "\n",
       "       [[ 55,  12,   5]],\n",
       "\n",
       "       [[ 69,  38,   9]],\n",
       "\n",
       "       [[ 66,  64,  67]],\n",
       "\n",
       "       [[ 66,  70,   8]],\n",
       "\n",
       "       [[ 65,  41,  39]],\n",
       "\n",
       "       [[ 14,  42,  75]],\n",
       "\n",
       "       [[ 68,  60,  18]],\n",
       "\n",
       "       [[ 93,  88,  51]],\n",
       "\n",
       "       [[ 63,  72,  48]],\n",
       "\n",
       "       [[ 92,  43,  68]],\n",
       "\n",
       "       [[ 95,  38,  67]],\n",
       "\n",
       "       [[ 26,  21,  40]],\n",
       "\n",
       "       [[  7,  51, 100]],\n",
       "\n",
       "       [[ 59,  24,   3]],\n",
       "\n",
       "       [[ 28,   3,   5]],\n",
       "\n",
       "       [[  7,  85,  50]],\n",
       "\n",
       "       [[ 98,  56,  24]],\n",
       "\n",
       "       [[ 84,  90,  56]],\n",
       "\n",
       "       [[ 85,  76,  88]],\n",
       "\n",
       "       [[ 38,  46,  56]],\n",
       "\n",
       "       [[ 67,  12,   4]],\n",
       "\n",
       "       [[ 78,  27,   8]],\n",
       "\n",
       "       [[ 38,  11,  31]],\n",
       "\n",
       "       [[ 62,  22,  86]],\n",
       "\n",
       "       [[ 66,  45,  57]],\n",
       "\n",
       "       [[ 72,   4,  58]],\n",
       "\n",
       "       [[ 26,  29,   0]],\n",
       "\n",
       "       [[ 31,  42,  96]],\n",
       "\n",
       "       [[  8,  79,   1]],\n",
       "\n",
       "       [[ 91,  55,  42]],\n",
       "\n",
       "       [[ 45,  54,  30]],\n",
       "\n",
       "       [[ 89,  47,   5]],\n",
       "\n",
       "       [[ 65,   5,  16]],\n",
       "\n",
       "       [[  0,  91,  29]],\n",
       "\n",
       "       [[ 81,  96,  35]],\n",
       "\n",
       "       [[ 42,  89,  12]],\n",
       "\n",
       "       [[ 40,  66,  47]],\n",
       "\n",
       "       [[ 21,  99,  21]]])"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gscore = np.argwhere(data[:,0] == 2)\n",
    "g = score[gscore] #女生成绩\n",
    "g"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0, 1, 3]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[100, 100, 100]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[52.74, 51.88, 53.73]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[55., 53., 57.]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[29.56, 27.12, 29.01]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 最小值、最大值、平均分、中位数、标准差\n",
    "bmin = b.min(axis = 0)\n",
    "bmax = b.max(axis = 0)\n",
    "bmean = b.mean(axis = 0).round(2)\n",
    "bmedian = np.median(b,axis = 0)\n",
    "bstd = np.std(b,axis = 0).round(2)\n",
    "display(bmin,bmax,bmean,bmedian,bstd)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0, 0, 0]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[100, 100, 100]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[51.76, 50.64, 45.22]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[53., 51., 44.]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([[28.93, 30.65, 30.01]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "gmin = g.min(axis = 0)\n",
    "gmax = g.max(axis = 0)\n",
    "gmean = g.mean(axis = 0).round(2)\n",
    "gmedian = np.median(g,axis = 0)\n",
    "gstd = np.std(g,axis = 0).round(2)\n",
    "display(gmin,gmax,gmean,gmedian,gstd)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
